package greetings

import (
	"fmt"
	"log"
	"time"
)

// TimerDelayFunction 延迟执行某一个函数
func TimerDelayFunction(fun func()) {

	go animation2()
	timer := time.NewTimer(50 * time.Second)
	select {
	case <-timer.C:
		fun()
	}
}

func DelayDemo2() {

	log.Println(time.Now())
	<-time.After(time.Second * 2)
	log.Println(time.Now())
}

func delayFunc() {

	fmt.Println("delay function ..... ")
}
